package com.spring.theory.bean.scope.type;

import javax.annotation.PreDestroy;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.web.context.WebApplicationContext;

@Slf4j
@Component
@Scope(WebApplicationContext.SCOPE_REQUEST)
public class BeanOfRequest {
    @PreDestroy
    public void destroy() {
        log.info("SCOPE_REQUEST destroy");
    }
}
